<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>平台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC__/res/layui/css/layui.css" media="all">
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 10px 30px 0 10px;">
    {if !$menu.pid}
    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: #FF5722">*</span> 业务</label>
        <div class="layui-input-block">
            <input type="radio" lay-verify="required" name="business_type" value="1" title="平台" {if $menu.business_type eq 1}checked{/if}>
            <input type="radio" lay-verify="required" name="business_type" value="2" title="后台" {if $menu.business_type eq 2}checked{/if}>
        </div>
    </div>
    {/if}

    {if $menu.pid}
    <div class="layui-form-item">
        <label class="layui-form-label">父级</label>
        <div class="layui-input-block">
            <input type="text" disabled readonly class="layui-input"  value="{$parentMenu.menu_name}" />
        </div>
    </div>
    {/if}

    <div class="layui-form-item">
        <label class="layui-form-label"> 图标</label>
        <div class="layui-input-block">
            <input type="text" name="icon_layui" placeholder="请输入图标" autocomplete="off" class="layui-input" value="{$menu.icon_layui}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: #FF5722">*</span> 名称</label>
        <div class="layui-input-block">
            <input type="text" name="menu_name" lay-verify="required" placeholder="请输入名称" lay-reqtext="请输入名称" autocomplete="off" class="layui-input" value="{$menu.menu_name}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: #FF5722">*</span> 标识</label>
        <div class="layui-input-block">
            <input type="text" name="menu_code" lay-verify="required" placeholder="请输入标识" lay-reqtext="请输入标识" autocomplete="off" class="layui-input" value="{$menu.menu_code}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: #FF5722">*</span> 类型</label>
        <div class="layui-input-block">
            <input type="radio" lay-verify="required" name="menu_type" value="1" title="菜单" {if $menu.menu_type eq 1}checked{/if}>
            <input type="radio" lay-verify="required" name="menu_type" value="2" title="按钮" {if $menu.menu_type eq 2}checked{/if}>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="sort" placeholder="请输入排序" autocomplete="off" class="layui-input" value="{$menu.sort}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"> 前端路由</label>
        <div class="layui-input-block">
            <input type="text" name="path" placeholder="请输入前端路由" autocomplete="off" class="layui-input" value="{$menu.path}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">后端路由</label>
        <div class="layui-input-block">
            <input type="text" name="api_path" placeholder="请输入后端路由" autocomplete="off" class="layui-input" value="{$menu.api_path}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span style="color: #FF5722">*</span> 状态</label>
        <div class="layui-input-block">
            <input type="checkbox" {if $menu.status}checked{/if} lay-verify="required" lay-filter="status" name="status" lay-skin="switch" lay-text="显示|隐藏" value="1">
        </div>
    </div>

    <div class="layui-form-item layui-hide">
        <input type="hidden" name="id" value="{$menu.id}"/>
        <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="确认添加">
        <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="确认编辑">
    </div>
</div>

<script src="__STATIC__/res/layui/layui.js"></script>
<script charset="utf-8" src="__STATIC__/kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="__STATIC__/kindeditor/lang/zh-CN.js"></script>
<script>
    layui.config({
        base: '__STATIC__/res/' //静态资源所在路径
    }).use(['index', 'form'])
</script>
</body>
</html>